﻿namespace Common.Core.DTO
{
    /// <summary>
    /// 通用分页列表数据基类
    /// </summary>
    /// <typeparam name="T">成功后返回的对象类型</typeparam>
    /// <remarks>
    /// 继承此基类的参数类尽量以Result或者Model为结尾
    /// </remarks>
    [Serializable]
    public abstract class PageEntityDTO<T> : IEntityDTO where T : BaseEntityDTO
    {
        /// <summary>
        /// 总记录数
        /// </summary>
        public int Counts { get; set; }
        /// <summary>
        /// 当前页
        /// </summary>
        public int CurrPage { get; set; }
        /// <summary>
        /// 总页数
        /// </summary>
        public int PageCount { get; set; }
        /// <summary>
        /// 每页记录数
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 返回分页列表数据
        /// </summary>
        public List<T> List
        {
            get;
            set;
        }
    }
}
